package com.tepth.vehiclemaintenance.mvp.work.history;

import com.tepth.vehiclemaintenance.bean.VehicleMaintain;
import com.tepth.vehiclemaintenance.net.ApiModel;
import com.tepth.vehiclemaintenance.net.Network;

import java.util.ArrayList;

import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

/**
 * Created by TMVPHelper on 2017/05/11
 */
public class HistoryModel implements HistoryContract.Model {

    @Override
    public Observable<ApiModel<ArrayList<VehicleMaintain>>> getVehicleHistory(String authKey, String startTime, String endTime, String vehicleNumber) {
        return Network.getApiService().getVehicleHistory(authKey, startTime, endTime, vehicleNumber)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread());
    }
}